package com.system.response.comment.vo;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.system.response.PageDto;
import com.system.response.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * @Classname CommentDtoResponse
 * @Date 2023/10/8 9:11
 * @Created ZFC
 */
@Data
@Api("评论树形数据")
public class CommentVo implements Serializable {
    @ApiModelProperty(value = "评论编号")
    private Integer id;
    @ApiModelProperty(value = "回复评论编号")
    private Integer parentId;
    @ApiModelProperty(value = "评论消息")
    private String message;
    @ApiModelProperty(value = "昵称")
    private String nickname;
    @ApiModelProperty(value = "邮箱")
    private String mailbox;

    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime createDate;

    @ApiModelProperty("下级评论回复")
    private List<CommentVo> children = new ArrayList<>();
}
